/**
 * @desc 主页面的底部tabs的状态
 */

const tabs = ['/pages/wallet/main', '/pages/charts/main', '', '/pages/book/main', '/pages/account/main']
const state = {
  tabIndex: 0
}

const mutations = {
  handleTab(state, index) {
    state.tabIndex = index
    wx.switchTab({ url: tabs[index] })
  }
}

export default {
  namespaced: true,
  state,
  mutations
}
